﻿using System;

namespace smp.RabbitMq
{
    internal static class InstancesFactory
    {
        private static ILog _log;
        internal static ILog Log
        {
            get
            {
                if(_log == null)
                {
                    throw new Exception("No ILog implementation or default implementation declared.");
                }
                return _log;
            }
            set { _log = value; }
        }

        private static IRabbitMqConfiguration _subscriberConfiguration;
        internal static IRabbitMqConfiguration SubscriberConfiguration
        {
            get
            {
                if(_subscriberConfiguration == null)
                {
                    throw new Exception("No subscriber configuration has been declared and loaded.");
                }
                return _subscriberConfiguration;
            }
            set { _subscriberConfiguration = value; }
        }
    }
}
